package com.design.memento.demo2;

/**
 * @author xiemiao
 * @description
 * @date 2023/08/18
 */
public class Client {
    public static void main(String[] args) {
        Originator originator = new Originator();
        originator.setState("比赛开始");
        originator.setState("中场休息");
        originator.setState("比赛结束");
        System.out.println(originator.getState());

        originator.restoreStateFromMemento(1);
        System.out.println(originator.getState());
    }
}
